#include "clientdialog.h"
#include "ui_clientdialog.h"

#include <QUrl>

ClientDialog::ClientDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ClientDialog)
{
    ui->setupUi(this);

    connect(ui->buttonBox, SIGNAL(accepted()), SLOT(slotAccepted()));
}

ClientDialog::~ClientDialog()
{
    delete ui;
}

void ClientDialog::slotAccepted()
{
    m_settings.insert("ServerUrl", QUrl(ui->leUrl->text()));
    m_settings.insert("ClientId", ui->leClientID->text());
    m_settings.insert("Topic", ui->leTopic->text());
    m_settings.insert("ClientId", ui->cbQos->itemData(ui->cbQos->currentIndex()));
}


